package org.kfive.nova.test.gc;

/**
 * Created with IntelliJ IDEA.
 * User: admin
 * Date: 16-6-4
 * Time: 下午6:01
 * To change this template use File | Settings | File Templates.
 * -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:D:/log/gc.log
 */
public class ReferenceCountGC {

    public Object instance = null;

    private static final int _1MB = 1024*1024;

    private byte[] bigSizes = new byte[2*_1MB];

    public static void main(String[] args) {
        ReferenceCountGC objA = new ReferenceCountGC();
        ReferenceCountGC objB = new ReferenceCountGC();
        objA.instance = objB;
        objB.instance = objA;
        objA = null;
        objB = null;
        System.gc();
    }
}
